<template>
  <div>
    <el-container>
      <el-header>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/ssss' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>权限管理</el-breadcrumb-item>
          <el-breadcrumb-item>权限列表</el-breadcrumb-item>
        </el-breadcrumb></el-header
      >
      <el-main>
        <el-table :data="list" border style="width: 100%">
          <el-table-column prop="date" label="序号">
            <template slot-scope="{ $index }">
              {{ $index + 1 }}
            </template>
          </el-table-column>
          <el-table-column prop="authName" label="权限名称"> </el-table-column>
          <el-table-column prop="path" label="路径"> </el-table-column>
          <el-table-column prop="city" label="权限等级">
            <template slot-scope="{ row }">
              <!-- {{ row }} -->
              <el-tag v-if="row.level == '0'">一级</el-tag>
              <el-tag v-else-if="row.level == '1'" type="success">二级</el-tag>
              <el-tag v-else type="warning">三级</el-tag>
            </template>
          </el-table-column>
        </el-table>
      </el-main>
    </el-container>
  </div>
</template>
<script>
import { huoQuRights } from '@/api/rights'
export default {
  name: 'RightsA',
  data () {
    return {
      list: []
    }
  },
  created () {
    this.hqRights()
  },
  computed: {
  },
  methods: {
    async hqRights () {
      const res = await huoQuRights()
      console.log(res);
      this.list = res.data
    },
    handleClick (row) {
      console.log(row);
    }
  }
}
</script>
<style lang='less'  scoped>
</style>
